﻿using System.ComponentModel.DataAnnotations;

namespace PortalWeb.CMS.Core.Entity
{
    /// <summary>
    /// 站点信息
    /// </summary>
    public class SiteInfo
    {
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 网站名称
        /// </summary>
        [Required(ErrorMessage = "必须输入网站名称!")]
        [StringLength(50, MinimumLength = 4, ErrorMessage = "{1}-{0}个字符!")]
        [Display(Name = "网站名称")]
        public string Name { get; set; }

        /// <summary>
        /// 网站标题
        /// </summary>
        [Required(ErrorMessage = "必须输入网站标题!")]
        [StringLength(50, MinimumLength = 4, ErrorMessage = "{1}-{0}个字符!")]
        [Display(Name = "网站标题")]
        public string Title { get; set; }

        /// <summary>
        /// 网站地址
        /// </summary>
        [Required(ErrorMessage = "必须输入网站地址!")]
        [StringLength(50, MinimumLength = 4, ErrorMessage = "{1}-{0}个字符!")]
        [Display(Name = "网站地址")]
        [DataType(DataType.Url)]
        public string Url { get; set; }

        /// <summary>
        /// Logo地址
        /// </summary>
        [StringLength(255, ErrorMessage = "必须少于{0}个字符!")]
        [Display(Name = "Logo地址")]
        public string LogoUrl { get; set; }

        /// <summary>
        /// Meta描述语
        /// </summary>
        [Required(ErrorMessage = "必须输入Meta描述语!")]
        [StringLength(500, ErrorMessage = "必须少于{0}个字符!")]
        [Display(Name = "Meta描述语")]
        [DataType(DataType.MultilineText)]
        public string MetaDescription { get; set; }

        /// <summary>
        /// Meta关键字
        /// </summary>
        [Required(ErrorMessage = "必须输入Meta关键字!")]
        [StringLength(500, ErrorMessage = "必须少于{0}个字符!")]
        [Display(Name = "Meta关键字")]
        [DataType(DataType.MultilineText)]
        public string MetaKeywords { get; set; }

        /// <summary>
        /// 版权信息
        /// </summary>
        [Required(ErrorMessage = "必须输入版权!")]
        [StringLength(500, ErrorMessage = "必须少于{0}个字符!")]
        [Display(Name = "版权信息")]
        [DataType(DataType.MultilineText)]
        public string Copyright { get; set; }
    }
}
